package com.extremeforce.module;

import com.extremeforce.R;
import com.extremeforce.function.GetNetImage;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

public class MyCouponDetailInfoActivity extends Activity{

	private TextView titleTextView;
	private TextView descTextView;
	private ImageView imageView;
	private TextView serialTextView;
	private TextView confirmButton;
	private TextView dateTextView;
	
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.mycoupondetaillayout);
		titleTextView = (TextView)findViewById(R.id.my_coupon_title);
		descTextView = (TextView)findViewById(R.id.my_coupon_desc);
		imageView = (ImageView)findViewById(R.id.my_coupon_image);
		serialTextView = (TextView)findViewById(R.id.my_coupon_serial);
		confirmButton = (TextView)findViewById(R.id.my_coupon_confirm_button);
		dateTextView = (TextView)findViewById(R.id.my_coupon_date);
		
		Intent intent = getIntent();
		Bundle bundle = intent.getExtras();
		titleTextView.setText(bundle.getString("title"));
		descTextView.setText(bundle.getString("desc"));
		imageView.setImageBitmap(GetNetImage.byteArrayToImage(bundle.getByteArray("image")));
		serialTextView.setText(bundle.getString("serial"));
		dateTextView.setText(bundle.getString("date"));
		confirmButton.setOnClickListener(
				new View.OnClickListener() {
					
					public void onClick(View v) {
						MyCouponDetailInfoActivity.this.finish();
					}
				}
				);
	}

}
